import { createRouter, createWebHashHistory } from 'vue-router'


const routes = [
    {
        path: '/',
        component: () => import("../views/Home.vue")
    },
    {
        path: '/test',
        component: () => import("../views/Test.vue")
    },
    {
        path: '/login',
        component: () => import("../views/Login.vue")
    },
    {
        path: '/register',
        component: () => import("../views/Register.vue")
    },
    {
        path: '/detail',
        component: () => import('../views/Detail.vue')
    },
    {
        path: "/dashboard",
        component: () => import("../views/Dashboard.vue"), children: [
            {
                path: "/dashboard/category",
                component: () => import("../views/Category.vue")
            },
            {
                path: "/dashboard/article",
                component: () => import("../views/Article.vue")
            },
        ]
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
